/*    */ package com.cr.web.controller.monitor;
/*    */ 
/*    */ import com.cr.common.annotation.Log;
/*    */ import com.cr.common.core.controller.BaseController;
/*    */ import com.cr.common.core.domain.AjaxResult;
/*    */ import com.cr.common.core.page.TableDataInfo;
/*    */ import com.cr.common.enums.BusinessType;
/*    */ import com.cr.common.utils.poi.ExcelUtil;
/*    */ import com.cr.system.domain.SysOperLog;
/*    */ import com.cr.system.service.ISysOperLogService;
/*    */ import java.util.List;
/*    */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.ui.ModelMap;
/*    */ import org.springframework.web.bind.annotation.GetMapping;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.PostMapping;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ import org.springframework.web.bind.annotation.ResponseBody;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"/monitor/operlog"})
/*    */ public class SysOperlogController extends BaseController {
/* 31 */   private String prefix = "monitor/operlog";
/*    */   
/*    */   @Autowired
/*    */   private ISysOperLogService operLogService;
/*    */   
/*    */   @RequiresPermissions({"monitor:operlog:view"})
/*    */   @GetMapping
/*    */   public String operlog() {
/* 40 */     return this.prefix + "/operlog";
/*    */   }
/*    */   
/*    */   @RequiresPermissions({"monitor:operlog:list"})
/*    */   @PostMapping({"/list"})
/*    */   @ResponseBody
/*    */   public TableDataInfo list(SysOperLog operLog) {
/* 48 */     startPage();
/* 49 */     List<SysOperLog> list = this.operLogService.selectOperLogList(operLog);
/* 50 */     return getDataTable(list);
/*    */   }
/*    */   
/*    */   @Log(title = "操作日志", businessType = BusinessType.EXPORT)
/*    */   @RequiresPermissions({"monitor:operlog:export"})
/*    */   @PostMapping({"/export"})
/*    */   @ResponseBody
/*    */   public AjaxResult export(SysOperLog operLog) {
/* 59 */     List<SysOperLog> list = this.operLogService.selectOperLogList(operLog);
/* 60 */     ExcelUtil<SysOperLog> util = new ExcelUtil(SysOperLog.class);
/* 61 */     return util.exportExcel(list, "操作日志");
/*    */   }
/*    */   
/*    */   @Log(title = "操作日志", businessType = BusinessType.DELETE)
/*    */   @RequiresPermissions({"monitor:operlog:remove"})
/*    */   @PostMapping({"/remove"})
/*    */   @ResponseBody
/*    */   public AjaxResult remove(String ids) {
/* 70 */     return toAjax(this.operLogService.deleteOperLogByIds(ids));
/*    */   }
/*    */   
/*    */   @RequiresPermissions({"monitor:operlog:detail"})
/*    */   @GetMapping({"/detail/{operId}"})
/*    */   public String detail(@PathVariable("operId") Long operId, ModelMap mmap) {
/* 77 */     mmap.put("operLog", this.operLogService.selectOperLogById(operId));
/* 78 */     return this.prefix + "/detail";
/*    */   }
/*    */   
/*    */   @Log(title = "操作日志", businessType = BusinessType.CLEAN)
/*    */   @RequiresPermissions({"monitor:operlog:remove"})
/*    */   @PostMapping({"/clean"})
/*    */   @ResponseBody
/*    */   public AjaxResult clean() {
/* 87 */     this.operLogService.cleanOperLog();
/* 88 */     return success();
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\classes\com.zip!\com\cr\web\controller\monitor\SysOperlogController.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */